import Tkinter as tk


class View(tk.Toplevel):
    def __init__(self, master):
	print 'init view'
        tk.Toplevel.__init__(self, master)
        self.protocol('WM_DELETE_WINDOW', self.master.destroy)
        tk.Label(self, text='My Money').pack(side='left')
        self.moneyCtrl = tk.Entry(self, width=8)
        self.moneyCtrl.pack(side='left')
        self.var = tk.StringVar()
        self.check = tk.Checkbutton(
        self, text="- money", variable=self.var
        )
        self.check.pack(side='top')

    def SetMoney(self, money):
	print 'setmoney view'
        self.moneyCtrl.delete(0, 'end')
        self.moneyCtrl.insert('end', str(money))


class ChangerWidget(tk.Toplevel):
    def __init__(self, master):
	print 'init changer widget'
        tk.Toplevel.__init__(self, master)
        self.addButton = tk.Button(self, text='Add', width=8)
        self.addButton.pack(side='left')
        self.removeButton = tk.Button(self, text='Remove', width=8)
        self.removeButton.pack(side='left')
